import axios from 'axios'
const requst = axios.create({
  baseURL: '/api',
  timeout: 5000
})
// 请求拦截
requst.interceptors.request.use((config) => {
  return config
})
// 响应拦截
requst.interceptors.response.use(
  (resolve) => {
    return resolve.data
  },
  (error) => {
    return Promise.reject(error)
  }
)
export default requst
